|
|
|
|
|
|
|
The form is part of the desktop and is your primary work area for creating the user interface. If you look closely at the form in Figure A.9, you might notice that the form has dots on it. These dots form a grid whose purpose is to help you position controls on the form; it is invisible when your program is running. You can control the spacing of the grid dots by choosing Tools, Options and selecting the appropriate options on the General tab of the resulting dialog box. You can also choose not to display the grid at all. The default grid is 120 by 120 twips. I prefer to make the grid smaller (60 by 60 twips), which allows me more precise control over the placement of objects on my form. This tighter grid is illustrated in Figure A.10. |
|
|
|
|
|
|
|
|
Figure A.9
When you are designing a form in
Visual Basic, a grid is available to
help you easily line up controls. |
|
|
|
|
|
|
|
|
Figure A.10
Making the grid smaller gives
you tighter control over the way
objects are placed on your forms. |
|
|
|
|
|
|
|
|
Controlling Your Forms and Controls |
|
|
|
|
|
|
|
|
The Properties window is an important part of the Visual Basic desktop. It shows all the available properties for the currently selected form, control, or module (see Figure A.11). If the Properties window isn't visible, first select the object(s) whose properties you want to view or change, and then press F4. You can also view this window by choosing View, Properties Windows, or by right-clicking an object and choosing Properties from the context-sensitive menu that pops up. |
|
|
|
|
|
|
|
|
Properties determine how a form or control looks and how it behaves in a program. The Properties window lists all of the currently selected object's properties that can be changed at designtime, as opposed to runtime properties, which can be changed only during program execution. Many properties can be changed either at designtime or at runtime. |
|
|
|
|
|